//a.cpp
//sizeof object

#include <iostream>
using namespace std;

class X{int i;float f;};
class Y : public virtual X {};
class Z : public virtual X {};
class A : public Y, public Z {};

int main()
{
  cout<<"sizeof(X)"<<sizeof(X)<<endl; //8

  cout<<"sizeof(Y)"<<sizeof(Y)<<endl; //12

  cout<<"sizeof(Z)"<<sizeof(Z)<<endl; //12

  cout<<"sizeof(A)"<<sizeof(A)<<endl; //16
  return 0;
}
